﻿using System.Linq;
using System.Reflection;
using Autofac;


namespace AppFx.BizTalk.Container
{
    public static class Extensions
    {
        public static void InstallFromAssemblies(this ContainerBuilder containerBuilder,
            params string[] assemblyNames)
        {
            containerBuilder.RegisterAssemblyModules(assemblyNames.Select(assemblyName => Assembly.Load(assemblyName)).ToArray());                        
        }
    }
}
